#define  _CRT_SECURE_NO_WARNINGS

#include "Dlist.h"

void Test()
{
	DList* plist = DListInit();

	DListPushBack(plist, 1);
	DListPushBack(plist, 2);
	DListPushBack(plist, 3);
	DListPrint(plist);

	DListPopBack(plist);
	DListPrint(plist);

	DListPushFront(plist, 10);
	DListPrint(plist);

	DListPopFront(plist);
	DListPrint(plist);

	DList* pos = DListFind(plist, 10);
	DListInsert(pos, 22);
	DListPrint(plist);

	pos = DListFind(plist, 22);
	DListErase(pos);
	pos = NULL;
	DListPrint(plist);

	DListDestroy(plist);
	plist = NULL;
}

int main()
{
	Test();

	return 0;
}